import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/tabbar/home.vue'
import Member from '@/components/tabbar/member.vue'
import Cart from '@/components/tabbar/cart.vue'
import Search from '@/components/tabbar/search.vue'
import NewsList from '@/components/news/newslist.vue'
import Newsinfo from '@/components/news/newsinfo'
import picShare from '@/components/news/picshare'
import picdetail from '@/components/news/picdetail'
import goodslist from '@/components/goods/goodslist'
import goodsinfo from '@/components/goods/goodsinfo'


Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: Home },
    { path: '/member', component: Member },
    { path: '/cart', component: Cart },
    { path: '/search', component: Search },
    { path: '/home/newsList', component: NewsList },
    { path: '/home/newsinfo/:id', component: Newsinfo },
    { path: '/home/picShare', component: picShare },
    { path: '/home/picdetail', component: picdetail },
    { path: '/home/goodslist', component: goodslist },
    { path: '/home/goodsinfo/:id', component: goodsinfo, name: "goodsinfo" } 
  ],
  linkActiveClass: "mui-active"
})
